package com.ArrayLIst;


import java.util.ArrayList;
import java.util.List;

/**
 * ClassName: ArrayLIstTest
 * Package:
 * Description:
 *
 * @Author 软件232班——欧阳昊淼
 * @Create 2024/8/28 16:29
 * @Version 17.0.2
 */
public class ArrayLIstTest {
    public static  void main(String[] args) {
        ArrayList <Student> list = new ArrayList<>();
        Student s1 = new Student(1," 张三");
        Student s2 = new Student(2,"李四" );
        Student s3 = new Student(3,"王五");

        list.add(s1);
        list.add(s2);
        list.add(s3);


        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));

            boolean remove = list.remove(s3);
            System.out.println(remove);
        }

        List<Student> list01 = list.subList(1,2);
        System.out.println(list01);



    }
}
